﻿/*1942 game clone
 * Authors:
 * Abdollah Tabareh
 * Bharat Bhushan Konka
 * Martin Svensson 
 * Richard Zianne
 * Tigran Harutyunyan
 * 
 * 2010
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Game1942
{
    //this class follows singleton pattern
    public sealed class Util
    {
        private static Util _instance=new Util();
        private readonly Random _random;
        public const int ScreenWidth=800;
        public const int ScreenHeight=600;
        private readonly Dictionary <string, object> _commonObjects = new Dictionary<string, object>();
        private Util()
        {
            _random = new Random(this.GetHashCode());
        }
        public static Util Instance
        {
            get
            {
                return _instance;
            }
        }
        public Random RandomGenerator
        {
            get
            {
                return _random;
            }
        }
        public Dictionary<string, object> CommonObjects
        {
            get
            {
                return _commonObjects;
            }
        }
    }
}
